<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /* 
            let arr=[1,3,5,7,9]
            console.log(arr);//[1,3,5,7,9]
            console.log(...arr);//1,3,5,7,9

            let arr2 = [2,4,6,8,...arr]
            console.log(arr2);

            function demo(...params){
                console.log(params instanceof Array ); //true
                console.log('我收到的参数是：',params);//[1,2,3,4]
            }
            demo(1,2,3,4)
        */

        let obj = {name:"kiki",age:19}
        console.log(obj);
        console.log(...obj);  //报错，
        console.log({...obj});  // {name:"kiki",age:19}
        
    </script>
</body>
</html>